package com.open.capacity.notice.dto;

import java.io.Serializable;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.Length;

import com.open.capacity.common.validator.UpdateGroup;
import com.open.capacity.notice.enums.MsgType;

import io.swagger.annotations.ApiModelProperty;
import lombok.AccessLevel;
import lombok.Data;
import lombok.Setter;

/**
 * 消息模板
 */
@Data
@SuppressWarnings("all")
public class MessageTemplateDto implements Serializable{

	@ApiModelProperty(value = "编号")
	@NotBlank(groups = UpdateGroup.class,message = "id不能为空")
	private String id;

	@ApiModelProperty(value = "模板名称")
	@NotBlank(message = "模板名称不能为空")
	@Length(max = 100, message = "超过模板名称最大长度")
	private String name;

	@ApiModelProperty(value = "业务线")
	@Length(max = 100, message = "超过业务线最大长度")
	@NotBlank(message = "业务线不能为空")
	private String businessLines;

	@NotBlank(message = "渠道类型不能为空")
	@ApiModelProperty(value = "渠道类型")
	@Pattern(regexp = "sms|wechat", message = "渠道类型只能是sms或wechat")
	private String sendChannel;

	@ApiModelProperty(value = "模板内容")
	private String msgContent;

	@ApiModelProperty(value = "消息类型")
	@Setter(AccessLevel.PRIVATE)
	private MsgType msgType;

}
